package domain

import "vrcm/src/vrcm/common/models"

type AntiTheftConfig struct {
	models.Model

	TenantId        string `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	DomainId        int    `json:"domain_id" gorm:"type:bigint unsigned;comment:域名配置id"`
	EnableWhite     string `json:"enable_white" gorm:"type:varchar(50);comment:yse启用 no禁用"`
	EnableBlack     string `json:"enable_black" gorm:"type:varchar(50);comment:yse启用 no禁用"`
	IncludeEmpty    int    `json:"include_empty" gorm:"type:tinyint;comment:1包含空 0不包含"`
	WhiteList       string `json:"white_list" gorm:"type:varchar(1000);comment:白名单"`
	BlackList       string `json:"black_list" gorm:"type:varchar(1000);comment:黑名单"`
	EnableIpControl string `json:"enable_ip_control" gorm:"type:varchar(50);comment:1启用 0禁用"`
	EnableUaControl string `json:"enable_ua_control" gorm:"type:varchar(50);comment:1启用 0禁用"`
	IpType          string `json:"ip_type" gorm:"type:varchar(50);comment:white 白名单 black 黑名单"`
	UaType          string `json:"ua_type" gorm:"type:varchar(50);comment:white 白名单 black 黑名单"`
	IpList          string `json:"ip_list" gorm:"type:varchar(1000);comment:ip控制名单"`
	UaList          string `json:"ua_list" gorm:"type:varchar(1000);comment:ua控制名单"`
	models.ModelTime
	models.ControlBy
}

func (AntiTheftConfig) TableName() string {
	return "anti_theft_config"
}

type UrlSign struct {
	models.Model

	TenantId       string `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	DomainId       int    `json:"domain_id" gorm:"type:bigint unsigned;comment:域名配置id"`
	SignStatus     string `json:"sign_status" gorm:"type:varchar(50);comment:on-开启  off-关闭"`
	SignType       string `json:"sign_type" gorm:"type:varchar(50);comment:type_a-方式A\ntype_b-方式B\ntype_c1-方式C1\ntype_c2-方"`
	SignMethod     string `json:"sign_method" gorm:"type:varchar(50);comment:签名方法"`
	KeyList        string `json:"key_list" gorm:"type:varchar(50);comment:华为cdn中，keys第一个为主key，第二个为备用key"`
	SessionTimeout string `json:"session_timeout" gorm:"type:varchar(50);comment:white 白名单 black 黑名单"`
	SignArg        string `json:"sign_arg" gorm:"type:varchar(100);comment:white 白名单 black 黑名单"`

	models.ModelTime
	models.ControlBy
}

func (UrlSign) TableName() string {
	return "url_sign"
}
